<style type="text/css">
<!--
	.inputTag {width: 186px;}
	.textareaTag {width: 186px; height:32px; font-size: 12px; border:1px solid #B3B3B3; resize: none;}
	.selectTag {width: 186px; height:22px; border:1px solid #B3B3B3;}
	.dateTag {width: 186px; border:1px solid #B3B3B3;}
-->
</style>

<script type="text/javascript">
<!--
	// 定义全局数组gbDynamicItems，用于保存用户注册页面所有动态产生的用户资料项
	var gbDynamicItems = new Array();
	
	// 创建select标签
	function createSelectTag(biiId, biiContent){
		var selectTag = $("#" + biiId);
		var contentArray = Utils.splitStr(biiContent, "，");
		
		if (contentArray != null && contentArray.length > 0) {
			for (var i = 0; i < contentArray.length; i++) {
				var option = $("<option>" + contentArray[i] + "</option>");
				selectTag.append(option);
			}
		}
	}
	
	// 创建单选按钮
	function createRadioTag(biiId, biiContent){
		var contentArray = Utils.splitStr(biiContent, "，");
		
		for (var i = 0, j = 1; i < contentArray.length; i++, j++) {
			var brTag = "<br/>";
			var htmlTag = "<input type='radio' name='"+ biiId +"' value='" + contentArray[i] + "'/><span>" + contentArray[i] + "</span>";
		
			if(j % 4 == 0){
				htmlTag += brTag;
			}
			
			document.write(htmlTag);
			
			if (i == 0) {
				$("input:radio[name='" + biiId + "']").attr("checked", true);
			} 
		}
	}
	
	// 创建复选框
	function createCheckboxTag(biiId, biiContent){
		var contentArray = Utils.splitStr(biiContent, "，");
		
		for (var i = 0, j = 1; i < contentArray.length; i++, j++) {
			var brTag = "<br/>";
			var htmlTag = "<input type='checkbox' name='"+ biiId +"' value='" + contentArray[i] + "'/><span>" + contentArray[i] + "</span>";
			
			if(j % 4 == 0){
				htmlTag += brTag;
			}
			
			document.write(htmlTag);
		}
	}
//-->
</script>

[#-- 创建注册会员问题列表自定义宏--]
[#macro ecs_ud_milist par_memberItemList]
	[#if par_memberItemList ??]
		[#list par_memberItemList as data] 
		<script type="text/javascript">
			<!--
				gbDynamicItems[gbDynamicItems.length] = ["${data.biiId}==${data.biiType}"];
			//-->
		</script>
		<tr>
			<td align="right">${data.biiName}</td>
			<td>
				[#-- 说明：biiType为资料项类型（0-文本框，1-文本域，2-下拉选择框，3-单选框，4-复选框，5-时间类型） --]
				[#switch data.biiType]
					[#case 0]
						<input type="text" id="${data.biiId}" class="inputBg inputTag"/>
						[#break]
					[#case 1]
						<textarea id="${data.biiId}" class="textareaTag"></textarea>
						[#break]
					[#case 2]
						<select id="${data.biiId}" class="selectTag"></select>
		
						<script type="text/javascript">
							<!--
								createSelectTag("${data.biiId}", "${data.biiContent}");
							//-->
						</script>
						[#break]
					[#case 3]
						[#if data.biiContent ??]
							<script type="text/javascript">
								<!--
									createRadioTag("${data.biiId}", "${data.biiContent}");
								//-->
							</script>
						[/#if]
						[#break]
					[#case 4]
						[#if data.biiContent ??]
							<script type="text/javascript">
								<!--
									createCheckboxTag("${data.biiId}", "${data.biiContent}");
								//-->
							</script>
						[/#if]
						[#break]
					[#case 5]
						<input type="text" id="${data.biiId}" class="Wdate dateTag" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd' })"/>
						[#break]
				[/#switch]
			</td>
		</tr>
		[/#list]	
	[/#if]
[/#macro]
